package com.ruoyi.business.common.enums.integration;

import com.ruoyi.business.common.config.UrlConfig;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author zhengyz
 * @date 2025/3/10
 */
@Getter
@AllArgsConstructor
public enum PathEnum {

    /**
     * 微信相关接口
     */
    WECHAT_JSCODE2SESSION(BusinessSystemEnum.WECHAT, "wechatApi", "/sns/jscode2session", "根据code获取登录信息", TimeOutEnum.DEFAULT),
    WECHAT_PHONE_INFO(BusinessSystemEnum.WECHAT, "wechatApi", "/wxa/business/getuserphonenumber", "根据code获取手机号信息", TimeOutEnum.DEFAULT),
    WECHAT_GET_TOKEN(BusinessSystemEnum.WECHAT, "wechatApi", "/cgi-bin/token", "getToken", TimeOutEnum.DEFAULT),
    WECHAT_PAY_INIT(BusinessSystemEnum.WECHAT, "wechatApiMch", "/v3/pay/transactions/jsapi", "JSAPI/小程序下单", TimeOutEnum.DEFAULT),
    WECHAT_URL_LINK(BusinessSystemEnum.WECHAT, "wechatApi", "/wxa/generate_urllink", "生成跳转小程序的链接", TimeOutEnum.DEFAULT),
    WECHAT_MINI_QRCODE(BusinessSystemEnum.WECHAT, "wechatApi", "/wxa/getwxacodeunlimit", "生成小程序二维码", TimeOutEnum.DEFAULT),
    WECHAT_GET_PHONE_NUMBER(BusinessSystemEnum.WECHAT, "wechatApi", "/wxa/business/getuserphonenumber", "获取用户手机号", TimeOutEnum.DEFAULT),
    WECHAT_UPLOAD_SHIPPING_INFO(BusinessSystemEnum.WECHAT, "wechatApi", "/wxa/sec/order/upload_shipping_info", "发货信息录入接口", TimeOutEnum.DEFAULT),

    /**
     * 免费接口
     */
    ADDRESS_BY_LATLNG(BusinessSystemEnum.PCONLINE, "pconlineApi", "/ipAreaCoordJson.jsp", "根据ip地址和经纬度获取其所在省市区", TimeOutEnum.DEFAULT),

    /**
     * 高德接口
     */
    AMAP_ADDRESS_BY_LATLNG(BusinessSystemEnum.AMAP, "amapApi", "/v3/geocode/regeo", "高德接口，根据经纬度获取地址信息", TimeOutEnum.DEFAULT),

    /**
     * WMS相关接口
     */
    WMS_CREATE_OUT(BusinessSystemEnum.WMS, "wmsApi", "/zbwebapi/v1.0/Do/Create", "创建出库单", TimeOutEnum.DEFAULT),
    WMS_CLOSE_OUT(BusinessSystemEnum.WMS, "wmsApi", "/zbwebapi/v1.0/Do/Cancel", "撤销出库单", TimeOutEnum.DEFAULT),
    WMS_QUERY_PRODUCT(BusinessSystemEnum.WMS, "wmsApi", "/zbwebapi/v1.0/Stock/StockBill", "查询商品信息", TimeOutEnum.WMS_QUERY),
    WMS_SAVE_PRODUCT(BusinessSystemEnum.WMS, "wmsApi", "/zbwebapi/v1.0/Product/CreateOrUpdate", "新增商品信息", TimeOutEnum.WMS_QUERY),

    /**
     * TMS相关接口
     */
    TMS_QUERY_LOGISTICS(BusinessSystemEnum.TMS, "tmsApi", "/api", "查询配送进度", TimeOutEnum.DEFAULT),
    ;

    private BusinessSystemEnum system;
    /**
     * 前缀 配置文件中的配置：baseurl.prefix.***，见配置类UrlConfig
     *
     * @see UrlConfig
     */
    private String baseUrl;
    private String path;
    private String desc;
    private TimeOutEnum timeOut;


}
